from django.db import models
from utils.BaseModel import BaseModel
# Create your models here.

class UserModel(BaseModel):
    username = models.CharField(max_length=50, unique=True,verbose_name='账号')
    password = models.CharField(max_length=50,verbose_name='密码')
    phone = models.CharField(max_length=11, unique=True,verbose_name='手机号')
    email = models.EmailField(max_length=50, unique=True,verbose_name='邮箱')
    headimg = models.CharField(max_length=100,null=True,blank=True,verbose_name='头像')
    intro = models.CharField(max_length=200,verbose_name='简介',default="")
    score = models.IntegerField(verbose_name='积分',default=100)
    level = models.IntegerField((0,'普通会员',(1,'银牌会员'),(2,"金牌会员")),default=0)
    class Meta:
        db_table = 'fguser'
    def __str__(self):
        return self.username

